import React from 'react'
import { Switch, Route, Redirect } from 'react-router-dom';
import List from './List'
import Add from './Add'
import Edit from './Edit'
function Default(props) {
    const baseUrl = props.match.path;
    return (
        <div>
            <Switch>
                <Route path={baseUrl + "/list"} component={List} />
                <Route path={baseUrl + "/add"} component={Add} />
                <Route path={baseUrl + "/Edit/:account"} component={Edit} />
                <Redirect exact from={baseUrl} to={baseUrl + '/list'} />
            </Switch>
        </div>
    )
}

export default Default;